import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;

/*
 * @Author: qianmingtian
 * @Date: 2020-06-19 15:14:35
 * @LastEditors: qianmingtian
 * @LastEditTime: 2020-06-20 09:39:05
 * @FilePath: \qianmingtian.github.io\code\java\HashSetTest.java
 */ 
public class HashSetTest {
    public static void main(final String[] args) {

        final String[] a = { "1", "2", "3", "4", "5" };
        final HashSet<String> hs = new HashSet<>(Arrays.asList(a));

        final Integer[] b = { 1 };
        final HashSet<Integer> bhs = new HashSet<>(Arrays.asList(b));
        
        if(bhs.contains(1)){
            System.out.println(bhs);
        }
        if(hs.contains("2")){
            
            System.out.println(hs);
        }

    }
}


